package com.bcmusic.oauth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @ClassName : OAuthApplication  //类名
 * @Description :   //描述
 * @Author : YG  //作者
 * @Date: 2020-09-22 09:10  //时间
 */
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan(basePackages = "com.yg.oauth.dao")
@EnableFeignClients(basePackages = {"com.bcmusic.user.feign"})
public class OAuthApplication {

    public static void main(String[] args) {
        SpringApplication.run(OAuthApplication.class,args);
    }


    @Bean(name = "restTemplate")
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
